package com.ruoyi.shaketicket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shaketicket.mapper.ShaketicketHomeMapper;
import com.ruoyi.shaketicket.domain.ShaketicketHome;
import com.ruoyi.shaketicket.service.IShaketicketHomeService;
import com.ruoyi.common.support.Convert;

/**
 * 摇一摇活动 服务层实现
 * 
 * @author lzy
 * @date 2019-03-01
 */
@Service
public class ShaketicketHomeServiceImpl implements IShaketicketHomeService 
{
	@Autowired
	private ShaketicketHomeMapper shaketicketHomeMapper;

	/**
     * 查询摇一摇活动信息
     * 
     * @param id 摇一摇活动ID
     * @return 摇一摇活动信息
     */
    @Override
	public ShaketicketHome selectShaketicketHomeById(String id)
	{
	    return shaketicketHomeMapper.selectShaketicketHomeById(id);
	}
	
	/**
     * 查询摇一摇活动列表
     * 
     * @param shaketicketHome 摇一摇活动信息
     * @return 摇一摇活动集合
     */
	@Override
	public List<ShaketicketHome> selectShaketicketHomeList(ShaketicketHome shaketicketHome)
	{
	    return shaketicketHomeMapper.selectShaketicketHomeList(shaketicketHome);
	}
	
    /**
     * 新增摇一摇活动
     * 
     * @param shaketicketHome 摇一摇活动信息
     * @return 结果
     */
	@Override
	public int insertShaketicketHome(ShaketicketHome shaketicketHome)
	{
	    return shaketicketHomeMapper.insertShaketicketHome(shaketicketHome);
	}
	
	/**
     * 修改摇一摇活动
     * 
     * @param shaketicketHome 摇一摇活动信息
     * @return 结果
     */
	@Override
	public int updateShaketicketHome(ShaketicketHome shaketicketHome)
	{
	    return shaketicketHomeMapper.updateShaketicketHome(shaketicketHome);
	}

	/**
     * 删除摇一摇活动对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteShaketicketHomeByIds(String ids)
	{
		return shaketicketHomeMapper.deleteShaketicketHomeByIds(Convert.toStrArray(ids));
	}
	
}
